<%-- 
    Document   : logout
    Created on : 25.07.2009, 15:24:10
    Author     : Mario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <script>
            function OperaReload() {
                try {
                    var headElement = document.getElementsByTagName("head")[0];
                    if (headElement && headElement.innerHTML)
                        headElement.innerHTML += "<meta http-equiv=\"refresh\" content=\"0\">";
                }
                catch (e) {}
            }
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body onUnload="OperaReload()">
        <jsp:useBean id="watcher" scope="application" class="de.stalinski.login.Watcher" />
        <%
        String user = request.getParameter("user");
        String id = request.getParameter("id");
        watcher.unregister(user, id);
        String ret = "<meta http-equiv=\"refresh\" content=\"1; URL=index.jsp\">";
        out.print(ret);
        %><script>
            window.close();
        </script>
    </body>
</html>
